package com.qingke.Qiximybatis.business;

import java.util.List;
import org.apache.ibatis.session.SqlSession;
import com.qingke.Qiximybatis.QixiApp;
import com.qingke.Qiximybatis.QixiDao;
import com.qingke.Qiximybatis.command.UserCommand;
import com.qingke.Qiximybatis.mapper.InvitationMapper;
import com.qingke.Qiximybatis.sqlclass.Invitation;
import com.qingke.Qiximybatis.sqlclass.MyUser;

public class InvitationIn12 extends UserCommand {
	public InvitationIn12(MyUser user) {
		super(user);
	}
	//查看我的邀请信息。
	@Override
	public void executeUserCommand() {
		SqlSession session = QixiDao.mybatisSession();
		System.out.println("欢迎进入被邀请查询页面：");
		InvitationMapper inviM = session.getMapper(InvitationMapper.class);
		List<Invitation> list = inviM.selectwode(QixiApp.getInstance().getUser().getId());
		for (Invitation invitation : list) {
			System.out.println(invitation);
		}
		
	}
}
